package com.zhao.provider.demo;

import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.rpc.*;

import static org.apache.dubbo.common.constants.CommonConstants.CONSUMER;
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER;

/**
 * @author pingxx
 * @version 1.0
 * @date 2020/5/15 3:38 下午
 */
@Activate(group = {CONSUMER, PROVIDER}, value = "demo")
@Slf4j
public class DemoFilter implements Filter {
    @Override
    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
        log.info("invoke {} {} ", invoker, invocation);
        Result result = invoker.invoke(invocation);
        return result;
    }
}
